package VN.EDU.IMIC.DEVELOPER.TRANTHITHANHNGA.ARRAY.EX2;

public class Views {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
	int result1;
	double result2;
	System.out.println("Test averaging array methods");
	
	int []arr1 = {1, 2,3, 4, 5, 6};
	double[]arr2 ={6.0, 4.4, 1.9, 2.9, 3.4, 3.5};
	
	System.out.println("Array: ");
	for(int i: arr1){
		System.out.println("\t"+i+"");
	}
	System.out.println("\n Averaging array using method of int array ");
	Controllers cObj = new Controllers();
	result1= cObj.yieldAverage(arr1);
	System.out.println(result1);

	System.out.println("Array: ");
	for(double i: arr2){
		System.out.println("\t"+i+"");
	}
	System.out.println("\n Averaging array using method of int array ");
	result2=cObj.yieldAverage(arr2);
	System.out.println(result2);

	}

}
